
<?php

/**
 * @Entity
 * @Table(name="user_telephone")
 */

class UserTelephone {

	/**
	 * @Id
	 * @Column(name="id", type="integer", length=11, nullable=false)
	 */
	private $id;

	/**
	 * @Column(name="user_id", type="integer", length=11, nullable=false)
	 */
	private $userId;

	/**
	 * @Column(name="telephone", type="string", length=50, nullable=false)
	 */
	private $telephone;

	function UserTelephone($telephone){
		$this->setId($telephone["id"]);
		$this->setUserId($telephone["user_id"]);
		$this->setTelephone($telephone["telephone"]);
	}


	public function getId() 
	{
		return $this->id;
	}

	public function setId($id) 
	{
		$this->id = $id;
	}

	public function getUserId() 
	{
		return $this->userId;
	}

	public function setUserId($userId) 
	{
		$this->userId = $userId;
	}

	public function getTelephone() 
	{
		return $this->telephone;
	}

	public function setTelephone($telephone) 
	{
		$this->telephone = $telephone;
	}
	
	public static function dbGetUserTelephones($where){
		return dbGet("UserTelephone", "user_telephone", $where);
	}
}
?>
